package com.example.traffic_learning;

import global.AsyncResponse;

import java.util.ArrayList;

import DTO.SignDTO;
import android.content.Context;
import android.os.AsyncTask;

public class GetSignDatabaseTask extends AsyncTask<String, Integer, ArrayList<SignDTO>>{
	Context context;
	public AsyncResponse delegate = null;
	public GetSignDatabaseTask(Context context){
		this.context = context;
	}
	@Override
	protected ArrayList<SignDTO> doInBackground(String... params) {
		ArrayList<SignDTO> arrSignDTO = new ArrayList<SignDTO>();
		arrSignDTO = SignDTO.getSignByKeyWord(context, params[0], params[1]);
		return arrSignDTO;
	}

	@Override
	protected void onPostExecute(ArrayList<SignDTO> result){
		super.onPostExecute(result);
		delegate.processGetSignDatabaseFinish(result);
	}
}
